/*
 * @Author: earl 
 * @Date: 2018-12-23 00:07:03 
 * @Last Modified by: earl
 * @Last Modified time: 2018-12-24 00:44:17
 * @Describe:  
 */

function pv(ctx){
  ctx.session.count++ // 设置session
  global.console.log('pv')
}

module.exports = function() {
  return async function(ctx, next) {
    pv(ctx)
    await next() // 交给下一个中间件
  }
}